home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample PMSAM / PMSAM Framework / RoboSamSlot / Application.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.8 KB  |  86 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TApplication.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    Tim Harnett
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>    12/12/94    TMH        use of thread events
  13.          <4>    10/20/94    TMH        validate system configuration
  14.          <3>    10/14/94    TMH        fixed AppleEvent dispatching to work correctly
  15.          <2>     10/6/94    JHB        Added support for Gestalt checking
  16.          <1>     9/20/94    TMH        Abandon RoadsideRest embrace Mercury
  17.          <2>     9/20/94    TMH        some experimental but working threaded stuff
  18.                  3/29/94    TMH        xxx put comment here xxx
  19.  
  20.     To Do:
  21. */
  22.  
  23.  
  24. #ifndef __Application__
  25. #define __Application__
  26.  
  27. class TAOCEHalfGateway;
  28. class THFSHalfGateway;
  29.  
  30. #ifndef __OCE__
  31. #include "OCE.h"
  32. #endif
  33.  
  34. #ifndef __OCEMAIL__
  35. #include "OCEMail.h"
  36. #endif
  37.  
  38. class CRecordID;
  39. class TCooperativeThread;
  40. class CCheckSystemConfiguration;
  41. //---------------------------
  42. //    M i s c e l l a n y
  43. //----------------------------
  44.     
  45. #define         kSleepTime        60*60
  46. #define        kQuitFileGateResult        -2
  47.  
  48.  
  49. //--------------------------------------
  50. //        T A p p l i c a t i o n
  51. //--------------------------------------
  52.  
  53.  
  54. class TApplication {
  55. public:
  56.             TApplication();
  57.  
  58.     void    IApplication();
  59.     OSErr    InitAuth();
  60.     
  61.     void     InitializeAppleEvents();
  62.     static pascal OSErr AppleEventsDispatch(AppleEvent* message,AppleEvent* reply, long info);
  63.  
  64.     void    Run();
  65.     void    HandleEvent(EventRecord *ev);
  66.     void    HandleHighLevelEvent(EventRecord *theEvent);
  67.     void     DoGatewayEvent(short slotID,long messageID,MailEPPCMsg* theeppc);
  68.  
  69.     void     SetWNESleepTime(long wneSleepTime) { fWNESleepTime  = wneSleepTime; }
  70.  
  71.     OCESetupLocation    Location() { return fOCELocation; }
  72.     
  73. private:
  74.  
  75.     long                fWNESleepTime;
  76.     TAOCEHalfGateway*    fAOCEHalfGateway;
  77.     
  78.     CreationID            fSetupRecordCID;
  79.  
  80.     OCESetupLocation    fOCELocation;
  81.     
  82. };
  83.  
  84. #endif __Application__
  85.  
  86.